package com.springboot.demo.service.impl;


import com.cx.item.common.service.impl.BaseServiceImpl;
import com.springboot.demo.mapper.DemoMapper;
import com.springboot.demo.model.example.DemoExample;
import com.springboot.demo.model.model.Demo;
import com.springboot.demo.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * Created by h on 2018/5/6.
 */
@Service
public class DemoServiceImpl extends BaseServiceImpl<Demo, DemoExample, DemoMapper> implements DemoService {

    @Value("${demo.public.key2}")
    private String demoPublicKey2;

    @Autowired
    private DemoMapper demoMapper;

    /**
     * 需要返回id，复写父类方法，返回id,不要用id可以不复写
     *
     * @param record
     * @return
     */
    @Override
    public int insertSelective(Demo record) {
        super.insertSelective(record);

        return record.getId();
    }
}
